Version

KeyedObservableCollection<TItem,TKey> Constructor

Syntax
'Declaration
 
Public Function New( _
   ByVal keyPropertyName As String, _
   Optional ByVal getKeyMethod As Func(Of TItem,TKey), _
   Optional ByVal disallowedKeys As IEnumerable(Of TKey), _
   Optional ByVal comparer As IEqualityComparer(Of TKey) _
)
public KeyedObservableCollection<TItem,TKey>( 
   string keyPropertyName,
   Func<TItem,TKey> getKeyMethod,
   IEnumerable<TKey> disallowedKeys,
   IEqualityComparer<TKey> comparer
)

Parameters

keyPropertyName
The name of the property that provides the key
getKeyMethod
An optional func that will provide the key for the item. If one is not specified the collection will try to obtain one for a public property named keyPropertyName of type TKey on type TItem.
disallowedKeys
An optional list of keys that are not allowed.
comparer
An optional comparer used to evaluate the keys.
Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also